package com.lm.akka.controller;

import com.lm.akka.service.ActorService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AkkaController {

    private final ActorService actorService;

    public AkkaController(ActorService actorService) {
        this.actorService = actorService;
    }

    @GetMapping("/akka")
    public String runAkka() throws Exception {
        return actorService.sendMessage("Hello Akka with Spring Boot!");
    }
}

